package com.askyjt.videosearch.service;

import com.askyjt.videosearch.entity.Picture;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yangjintao
 * @since 2020-11-05
 */
public interface PictureService extends IService<Picture> {

    /**
     * 根据上传的图片搜索相似的图
     * @param picturePath
     * @return
     */
    List<Picture> searchPicture(String picturePath, Integer topK);

    /**
     * 添加图片到数据库和milvus中
     * @param picture
     * @return
     */
    Boolean savePicture(Picture picture);

    /**
     * 批量删除图片
     * @param milvusIds
     * @return
     */
    Integer deletePicture(List<Long> milvusIds) throws InterruptedException;
}
